import java.util.Arrays;

public class 连续三个奇数的数组 {

        public static boolean threeConsecutiveOdds(int[] arr) {
            if(arr.length<3) {
                return false;
            }
            else {
                for(int i=0;i<arr.length-2;i++) {
                    if((arr[i]%2!=0) && (arr[i+1]%2!=0) && (arr[i+2]%2!=0)) {
                        return true;
                    }
                }
                return false;
            }
        }

    public static void main(String[] args) {
            int[] arr = {2,6,4,1};
        System.out.println(threeConsecutiveOdds(arr));
        int[][] arr1 = {{1,2},{1,2,3}};
        System.out.println(Arrays.deepToString(arr1));

    }
}
